Skip to content

Conversation

@ralf0131
Copy link
Collaborator

@ralf0131 ralf0131 commented Nov 26, 2025

Description

  • Introduced a new package for OpenTelemetry instrumentation specifically for Google Agent Development Kit (ADK).
  • Added pyproject.toml for package management and dependencies.
  • Implemented core observability features, including metrics and tracing, following OpenTelemetry GenAI semantic conventions.
  • Created example tools and a demo application to showcase usage.
  • Updated .gitignore to exclude Python bytecode and coverage files.
  • Added comprehensive tests for metrics and plugin integration to ensure compliance with OpenTelemetry standards.

This resolves #35

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit tests covered in the pull request.

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

_logger.exception(f"Error extracting tool attributes: {e}")
return self.extract_common_attributes("execute_tool")

def _extract_provider_name(self, model_name: str) -> str:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not reasonable to extract provider name from the model name - providers may host different models. I will create a common converter in "genai-util" and will replace this implementation soon. So feel free to leave it here.

ralf0131 and others added 12 commits December 25, 2025 16:55
- Add package.py to define instrumentation metadata
- Update instrumentation-genai/README.md with google-adk entry
- Fixes CI generate task failure

Change-Id: I2534d42f3d6538a4842d3b19b449e927685371e3
Co-developed-by: Cursor <[email protected]>
- Add google-adk >= 0.1.0 to libraries list
- Generated by running scripts/generate_instrumentation_bootstrap.py
- Fixes CI generate check failure

Change-Id: I9c80405105cc795c8a2c66d7bb02b5e1934e81e9
Co-developed-by: Cursor <[email protected]>
- Rename from opentelemetry-instrumentation-google-adk to loongsuite-instrumentation-google-adk
- Move from instrumentation-genai/ to instrumentation-loongsuite/
- Update pyproject.toml with loongsuite naming conventions
  - Change package name to loongsuite-instrumentation-google-adk
  - Use dynamic version from version.py
  - Update authors to LoongSuite Python Agent Authors
  - Update homepage URL to point to specific subdirectory
- Update instrumentation-genai/README.md (remove google-adk entry)
- Update instrumentation-loongsuite/README.md (add google-adk entry)
- Update bootstrap_gen.py (remove google-adk as it's now loongsuite-specific)

This aligns google-adk with other loongsuite-specific instrumentations.

Change-Id: Ia1c1807731cb5ba8ba8ada0632a749dedd8a453b
Co-developed-by: Cursor <[email protected]>
Change-Id: I088389a1c453e068e29bdd64f5e18f5bcce60787
Co-developed-by: Cursor <[email protected]>
- Introduced a global instance of GoogleAdkObservabilityPlugin to facilitate both manual and auto instrumentation.
- Updated the GoogleAdkInstrumentor to utilize the global plugin, ensuring consistent observability across multiple instances.
- Added a wrapper function for Runner initialization to automatically inject the observability plugin.
- Improved documentation for usage and functionality of the instrumentation methods.

This update streamlines the instrumentation process and enhances compatibility with various usage scenarios.

Change-Id: I8a7934626fd8e8deac1f595da66174b6ca8dd7bb
Co-developed-by: Cursor <[email protected]>
Change-Id: [insert-change-id-here]
Change-Id: Ibe84196785ff3c9869feaa5de1ff60582aa2eea3
Co-developed-by: Cursor <[email protected]>
… files

- Reordered and grouped import statements for better readability in main.py and tools.py.
- Updated import statements to use consistent quotation styles.
- Removed unnecessary blank lines and improved formatting for clarity.
- Enhanced the organization of code in internal modules to align with best practices.

This refactoring improves code maintainability and readability across the Google ADK instrumentation files.

Change-Id: I3e9723b4870ea0f062a044ea7d2c6c1e7bee39da
Co-developed-by: Cursor <[email protected]>
Change-Id: If5dbb7ad8f67a9e51ff95398b79f59982020bf5a
Co-developed-by: Cursor <[email protected]>
Change-Id: I228fc9153b9066f096ae2a75906ca57f7f05dd91
Co-developed-by: Cursor <[email protected]>
@ralf0131 ralf0131 force-pushed the copilot/rebase-onto-latest-main branch from 59a3019 to 661a5da Compare December 25, 2025 09:53
@github-actions github-actions bot requested a review from Cirilla-zmh December 25, 2025 10:25
- Introduced new Tox environments for testing and linting Google ADK instrumentation across multiple Python versions.
- Updated GitHub Actions workflows to include jobs for linting and testing Google ADK instrumentation.
- Added requirements files for both latest and oldest dependencies for Google ADK tests.
- Enhanced error handling in main.py and improved logging for better debugging.

This update enhances the testing framework and ensures comprehensive coverage for Google ADK instrumentation.

Change-Id: [insert-change-id-here]
Change-Id: I0013d216d47a9dd8146752ffb67d4cd18dfe3679
Co-developed-by: Cursor <[email protected]>
- Deleted coverage options and settings from pyproject.toml to streamline the configuration.
- This change simplifies the testing setup and focuses on essential dependencies.

Change-Id: [insert-change-id-here]
Change-Id: Ia8956264c029b69e82a9ef1b737503fa3de2549d
Co-developed-by: Cursor <[email protected]>
- Introduced new integration tests using pytest-vcr to record and replay real API interactions with the Google ADK.
- Created fixtures in `conftest.py` for span, log, metric exporters, and tracer providers to facilitate testing.
- Added multiple test cases to validate LLM chat functionality with and without content capture, ensuring compliance with OTel GenAI attributes.
- Updated requirements files to include pytest-vcr and related dependencies for testing.
- Documented the usage of VCR cassettes for recording and running tests.

This enhancement improves the testing framework and ensures robust coverage for Google ADK instrumentation.

Change-Id: [insert-change-id-here]
Change-Id: I46e41e64288cc443f1757f3e3fa895561eb72532
Co-developed-by: Cursor <[email protected]>
Change-Id: I371d749769371cfa12cc1a6e6c53fb4aef5d2097
Co-developed-by: Cursor <[email protected]>
Change-Id: Ib89aa451a8b7dc142e054ca290286d1401c750ff
Co-developed-by: Cursor <[email protected]>
Change-Id: I51ff02362a7c33c098fd75ff9f890e868d73c653
Co-developed-by: Cursor <[email protected]>
Change-Id: I5c6def57fb8c85c4ea93792a7328be9cef96abe3
Co-developed-by: Cursor <[email protected]>
Change-Id: Ic74c6d6f2ff38507bedc12dd074cb1fd1f193bd9
Co-developed-by: Cursor <[email protected]>
Change-Id: I367f1b8d9d1279c97b4e07e6dfb5b9ac93fc09e4
Co-developed-by: Cursor <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] Add support for Google ADK

4 participants